package com.aspose.cells;

import java.util.ArrayList;

class zcfd {
   private static String e = "Invalid formula:";
   int a = 0;
   ArrayList b;
   private int f;
   private int g;
   int c;
   WorksheetCollection d;
   private byte h;
   private static final com.aspose.cells.b.c.a.za i = new com.aspose.cells.b.c.a.za(new String[]{"INDEX", "IF", "#DIV/0!", "#NULL!", "#N/A", "#NAME?", "#NUM!", "#REF!", "#VALUE!", "", "\"\"", "FALSE", "TRUE", "()", " ", "+", "-", "*", "/", "^", "&", ",", ":", "%", "<", "=", "<=", ">=", ">", "<>", "ABS", "ACOS", "ACOSH", "ADDRESS", "ASC", "ASIN", "ASINH", "AND", "ARCTAN", "ATAN", "ATAN2", "ATANH", "AVEDEV", "AVERAGE", "AVERAGEA", "BETADIST", "BETAINV", "BINOMDIST", "CELL", "CEILING", "CHAR", "CHIDIST", "CHIINV", "CHITEST", "CHOOSE", "CLEAN", "CODE", "COLUMN", "COLUMNS", "COMBIN", "CONCATENATE", "CONFIDENCE", "CORREL", "COS", "COSH", "COUNT", "COUNTA", "COUNTBLANK", "COUNTIF", "COVAR", "CRITBINOM", "DATE", "DATEDIF", "DATESTRING", "DATEVALUE", "DAVERAGE", "DAYS360", "DCOUNT", "DCOUNTA", "DAY", "DB", "DDB", "DGET", "DEGREES", "DEVSQ", "DMAX", "DMIN", "DOLLAR", "DPRODUCT", "DSTDEV", "DSTDEVP", "DSUM", "DVAR", "DVARP", "ERROR.TYPE", "EVEN", "EXACT", "EXP", "EXPONDIST", "FACT", "FDIST", "FINV", "FIND", "FINDB", "FIXED", "FLOOR", "FORECAST", "FREQUENCY", "FTEST", "FV", "GAMMADIST", "GAMMAINV", "GAMMALN", "GEOMEAN", "GETPIVOTDATA", "HARMEAN", "HLOOKUP", "HOUR", "HYPERLINK", "HYPGEOMVERT", "INDIRECT", "INFO", "INT", "INTERCEPT", "IPMT", "IRR", "ISBLANK", "ISERR", "ISLOGICAL", "ISERROR", "ISNA", "ISNONTEXT", "ISNUMBER", "ISPMT", "ISREF", "ISTEXT", "KURT", "LARGE", "LEFT", "LEFTB", "LEN", "LENB", "LINEST", "LN", "LOG", "LOG10", "LOGNORMDIST", "LOGINV", "LOGEST", "NEGBINOMDIST", "LOOKUP", "LOWER", "MATCH", "MAX", "MAXA", "MEDIAN", "MDETERM", "MINVERSE", "MID", "MIDB", "MIN", "MINA", "MINUTE", "MIRR", "MMULT", "MOD", "MODE", "MONTH", "N", "NA", "NORMDIST", "NORMSDIST", "NORMINV", "NORMSINV", "NOT", "NOW", "NUMBERSTRING", "NPER", "NPV", "ODD", "OFFSET", "OR", "PEARSON", "PERCENTILE", "PERCENTRANK", "PERMUT", "PHONETIC", "PI", "PMT", "POISSON", "POWER", "PPMT", "PROB", "PRODUCT", "PROPER", "PV", "QUARTILE", "RADIANS", "RAND", "RANK", "RATE", "REPLACE", "REPLACEB", "REPT", "RIGHT", "RIGHTB", "ROMAN", "ROUND", "ROUNDDOWN", "ROUNDUP", "ROW", "ROWS", "RSQ", "SEARCH", "SEARCHB", "SECOND", "SIGN", "SIN", "SINH", "SKEW", "SLN", "SMALL", "SQRT", "STANDARDIZE", "STDEV", "STDEV.S", "_XLFN.STDEV.S", "STDEVA", "STDEVP", "STDEV.P", "_XLFN.STDEV.P", "STDEVPA", "STEYX", "SUBSTITUTE", "SUBTOTAL", "SUM", "SUMPRODUCT", "SUMIF", "SUMSQ", "SUMX2MY2", "SUMX2PY2", "SUMXMY2", "SYD", "T", "TAN", "TANH", "TDIST", "TEXT", "TIME", "TIMEVALUE", "TINV", "TODAY", "TRANSPOSE", "TREND", "TRIM", "TRIMMEAN", "TRUNC", "TTEST", "TYPE", "UPPER", "VALUE", "VAR", "VARA", "VARP", "VARPA", "VDB", "VLOOKUP", "WEEKDAY", "WEIBULL", "WIDECHAR", "YEAR", "ZTEST", "COUNTIFS", "AGGREGATE"});

   void a(int var1, int var2, int var3, int var4) {
      this.c = var1;
      this.f = var2;
      this.g = var3;
      this.h = (byte)var4;
      this.a = 0;
      this.b = new ArrayList();
   }

   boolean a() {
      return (this.h & 255 & 1) != 0;
   }

   boolean b() {
      return (this.h & 255 & 2) != 0;
   }

   boolean c() {
      return (this.h & 255 & 16) != 0;
   }

   void a(boolean var1) {
      if (var1) {
         this.h = (byte)(this.h | 16);
      } else {
         this.h = (byte)(this.h & 239);
      }

   }

   boolean d() {
      return (this.h & 255 & 32) != 0;
   }

   void b(boolean var1) {
      if (var1) {
         this.h = (byte)(this.h | 32);
      } else {
         this.h = (byte)(this.h & 223);
      }

   }

   zcfd(WorksheetCollection var1) {
      this.d = var1;
      this.a = 0;
      this.b = new ArrayList();
   }

   byte[] a(zabd var1, int var2, int var3, boolean var4) {
      int var5 = this.a(var1, var2, var3, false, false);
      if (this.d()) {
         var5 += 4;
      }

      byte[] var6 = new byte[var5 + (var4 ? 8 + this.a : 0)];
      int var7 = 0;
      int var8 = var5;
      if (var4) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var5), 0, var6, 0, 4);
         var7 = 4;
         var8 = var5 + 4;
      }

      if (this.d()) {
         var6[var7++] = 25;
         var6[var7++] = 1;
         var7 += 2;
         this.b(false);
      }

      this.a(var1, var6, var7);
      if (var4 && this.a != 0) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(this.a), 0, var6, var8, 4);
         var8 += 4;

         for(int var9 = 0; var9 < this.b.size(); ++var9) {
            byte[] var10 = (byte[])((byte[])this.b.get(var9));
            System.arraycopy(var10, 0, var6, var8, var10.length);
            var8 += var10.length;
         }

         this.b = null;
         this.a = 0;
      }

      return var6;
   }

   private int a(zabd var1, int var2, int var3, boolean var4, boolean var5) {
      int var6 = 0;
      boolean var7 = false;
      int var9;
      zabd var10;
      if (var1.f() == null) {
         int[] var8 = this.a(var1, var2, var3);
         var7 = var1.g();
         if (var2 != 96 && var4) {
            switch(var1.f()[0]) {
            case 65:
            case 66:
            case 67:
            case 68:
            case 69:
            case 70:
            case 71:
            case 72:
            case 73:
            case 90:
            case 91:
            case 92:
            case 93:
               var1.f()[0] = (byte)((var1.f()[0] & 255) + 32);
            case 74:
            case 75:
            case 76:
            case 77:
            case 78:
            case 79:
            case 80:
            case 81:
            case 82:
            case 83:
            case 84:
            case 85:
            case 86:
            case 87:
            case 88:
            case 89:
            }
         }

         if (var1.i() != 0 && var1.d() != null && var1.d().size() > 0) {
            for(var9 = 0; var9 < var1.d().size(); ++var9) {
               var10 = (zabd)var1.d().get(var9);
               int var11;
               if (var8 != null && var8.length != 0) {
                  if (var9 >= var8.length) {
                     var11 = var8[var8.length - 1];
                  } else {
                     var11 = var8[var9];
                  }
               } else {
                  var11 = 32;
               }

               boolean var12 = var4;
               if (var4) {
                  if (var11 == 64 && var1.i() == 3) {
                     switch(i.a(var1.b())) {
                     case 0:
                        var12 = false;
                        break;
                     default:
                        var11 = 96;
                     }
                  }
               } else {
                  switch(var3) {
                  case 0:
                     var12 = var11 == 96;
                     break;
                  case 1:
                     var12 = var11 == 96 || var11 == 32;
                     break;
                  case 2:
                     var12 = var11 == 96 || var11 == 32;
                  }
               }

               var6 += this.a(var10, var11, var3, var12, var7);
            }
         }
      } else {
         byte var13 = 64;
         if (var4) {
            var13 = 96;
         }

         for(var9 = 0; var9 < var1.d().size(); ++var9) {
            var10 = (zabd)var1.d().get(var9);
            var6 += this.a(var10, var13, var3, var4, false);
         }
      }

      int var14 = var6 + var1.f().length;
      switch(var1.i()) {
      case 2:
         if (var7 && !var5) {
            var14 += 3;
            var9 = var1.h();
            if (var9 != 9) {
               var14 += 4;
            }

            if (var4) {
               var1.b = 96 | var9;
            } else {
               switch(var2) {
               case 32:
                  var1.b = 32 | var9;
                  break;
               case 64:
                  var1.b = 64 | var9;
                  break;
               case 96:
                  var1.b = 96 | var9;
               }
            }
         }
         break;
      case 3:
         switch(i.a(var1.b())) {
         case 1:
            var14 += var1.d().size() * 4;
         }
      case 4:
      default:
         break;
      case 5:
         var14 += 4;
      }

      return var14;
   }

   int a(zabd var1, byte[] var2, int var3) {
      int var4 = var3;
      int var5;
      zabd var6;
      int var9;
      switch(var1.i()) {
      case 0:
         System.arraycopy(var1.f(), 0, var2, var3, var1.f().length);
         var4 = var3 + var1.f().length;
         break;
      case 1:
      case 4:
      default:
         if (var1.d() != null && var1.d().size() > 0) {
            for(var5 = 0; var5 < var1.d().size(); ++var5) {
               var6 = (zabd)var1.d().get(var5);
               var4 = this.a(var6, var2, var4);
            }
         }

         System.arraycopy(var1.f(), 0, var2, var4, var1.f().length);
         var4 += var1.f().length;
         break;
      case 2:
         if (var1.b >= 32) {
            var5 = var3 + 1;
            var2[var3] = (byte)var1.b;
            var4 = var3 + 3;
            if ((var1.b & 15) != 9) {
               var4 += 4;
               var5 += 4;
            }

            var9 = var4;
            int var10;
            if (var1.d() != null && var1.d().size() > 0) {
               for(var10 = 0; var10 < var1.d().size(); ++var10) {
                  zabd var8 = (zabd)var1.d().get(var10);
                  var4 = this.a(var8, var2, var4);
               }
            }

            System.arraycopy(var1.f(), 0, var2, var4, var1.f().length);
            var4 += var1.f().length;
            var10 = var4 - var9;
            System.arraycopy(com.aspose.cells.b.a.zc.a(var10), 0, var2, var5, 2);
         } else {
            if (var1.d() != null && var1.d().size() > 0) {
               for(var5 = 0; var5 < var1.d().size(); ++var5) {
                  var6 = (zabd)var1.d().get(var5);
                  var4 = this.a(var6, var2, var4);
               }
            }

            System.arraycopy(var1.f(), 0, var2, var4, var1.f().length);
            var4 += var1.f().length;
         }
         break;
      case 3:
         if (var1.d() != null && var1.d().size() > 0) {
            label118:
            switch(i.a(var1.b())) {
            case 1:
               var5 = 0;
               var9 = 0;

               while(true) {
                  if (var9 >= var1.d().size()) {
                     break label118;
                  }

                  zabd var7 = (zabd)var1.d().get(var9);
                  var4 = this.a(var7, var2, var4);
                  switch(var9) {
                  case 0:
                     var2[var4] = 25;
                     var2[var4 + 1] = 2;
                     var4 += 4;
                     var5 = var4;
                     break;
                  case 1:
                     var2[var4] = 25;
                     var2[var4 + 1] = 8;
                     if (var1.d().size() > 2) {
                        var4 += 4;
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var4 - var5), 0, var2, var5 - 2, 2);
                        var5 = var4;
                     } else {
                        var2[var4 + 2] = 3;
                        var2[var4 + 3] = 0;
                        var4 += 4;
                        System.arraycopy(com.aspose.cells.b.a.zc.a(var4 - var5), 0, var2, var5 - 2, 2);
                     }
                     break;
                  case 2:
                     var2[var4] = 25;
                     var2[var4 + 1] = 8;
                     var2[var4 + 2] = 3;
                     var2[var4 + 3] = 0;
                     var4 += 4;
                     System.arraycopy(com.aspose.cells.b.a.zc.a(var4 - var5 + 3), 0, var2, var5 - 2, 2);
                  }

                  ++var9;
               }
            default:
               for(var5 = 0; var5 < var1.d().size(); ++var5) {
                  var6 = (zabd)var1.d().get(var5);
                  var4 = this.a(var6, var2, var4);
               }
            }
         }

         System.arraycopy(var1.f(), 0, var2, var4, var1.f().length);
         var4 += var1.f().length;
         break;
      case 5:
         System.arraycopy(var1.f(), 0, var2, var3, var1.f().length);
         var4 = var3 + var1.f().length;
         if (var1.d() != null && var1.d().size() > 0) {
            for(var5 = 0; var5 < var1.d().size(); ++var5) {
               var6 = (zabd)var1.d().get(var5);
               var4 = this.a(var6, var2, var4);
            }
         }

         if (var1.f()[0] == 99) {
            var2[var4] = 98;
         } else {
            var2[var4] = 66;
         }

         if (var1.d() == null) {
            var2[var4 + 1] = 1;
         } else {
            var2[var4 + 1] = (byte)(var1.d().size() + 1);
         }

         var2[var4 + 2] = -1;
         var4 += 4;
      }

      return var4;
   }

   private void a(zabd var1) {
      String var2 = var1.b();
      if (var2 != null && var2.length() != 0) {
         if (var2.charAt(0) == '"') {
            var2 = var2.substring(1, 1 + (var2.length() - 2));
            if (var2.length() == 0) {
               var1.a(new byte[3]);
               var1.f()[0] = 1;
               return;
            }
         } else {
            if (zsk.c(var2)) {
               var1.a(new byte[5]);
               var1.f()[0] = 4;
               switch(i.a(var2)) {
               case 2:
                  var1.f()[1] = 7;
                  break;
               case 3:
                  var1.f()[1] = 0;
                  break;
               case 4:
                  var1.f()[1] = 42;
                  break;
               case 5:
                  var1.f()[1] = 29;
                  break;
               case 6:
                  var1.f()[1] = 36;
                  break;
               case 7:
                  var1.f()[1] = 23;
                  break;
               case 8:
                  var1.f()[1] = 15;
               }

               return;
            }

            if (zapb.b(var2)) {
               double var3 = com.aspose.cells.b.a.zn.a(var2, com.aspose.cells.b.a.c.za.b());
               var1.a(new byte[9]);
               var1.f()[0] = 0;
               System.arraycopy(com.aspose.cells.b.a.zc.a(var3), 0, var1.f(), 1, 8);
               return;
            }

            if (var2.toUpperCase().equals("TRUE")) {
               var1.a(new byte[2]);
               var1.f()[0] = 2;
               var1.f()[1] = 1;
               return;
            }

            if (var2.toUpperCase().equals("FALSE")) {
               var1.a(new byte[2]);
               var1.f()[0] = 2;
               return;
            }
         }

         var1.a(new byte[3 + var2.length() * 2]);
         var1.f()[0] = 1;
         System.arraycopy(com.aspose.cells.b.a.zc.a(var2.length()), 0, var1.f(), 1, 2);
         System.arraycopy(Encoding.getUnicode().a(var2), 0, var1.f(), 3, var2.length() * 2);
      } else {
         var1.a(new byte[3]);
         var1.f()[0] = 1;
      }
   }

   private int[] a(zabd var1, int var2, int var3) {
      String var4 = var1.b();
      if (var4 == null) {
         var1.a(zasg.e);
         return zabl.h;
      } else {
         int[] var5 = zabl.h;
         switch(var1.i()) {
         case 0:
            if (var1.d() != null && var1.d().size() != 0) {
               Object var14 = var1.d().get(0);
               if (var14 == null) {
                  var1.a(new byte[15]);
                  var1.f()[0] = 96;
                  this.a += 8;
                  com.aspose.cells.b.a.a.ze.a(this.b, (Object)(new byte[8]));
                  return zabl.i;
               }

               if (var14 instanceof zabd[][]) {
                  zabd[][] var7 = (zabd[][])((zabd[][])var14);
                  var1.a(new byte[15]);
                  switch(var2) {
                  case 64:
                     var1.f()[0] = 64;
                     break;
                  default:
                     var1.f()[0] = 96;
                  }

                  ArrayList var8 = new ArrayList();
                  int var9 = 8;

                  int var11;
                  for(int var10 = 0; var10 < var7.length; ++var10) {
                     for(var11 = 0; var11 < var7[var10].length; ++var11) {
                        zabd var12 = var7[var10][var11];
                        this.a(var12);
                        com.aspose.cells.b.a.a.ze.a(var8, (Object)var12.f());
                        var9 += var12.f().length;
                     }
                  }

                  byte[] var16 = new byte[var9];
                  com.aspose.cells.b.a.a.ze.a(this.b, (Object)var16);
                  this.a += var9;
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var7[0].length), 0, var16, 0, 4);
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var7.length), 0, var16, 4, 4);
                  var11 = 8;

                  for(int var17 = 0; var17 < var8.size(); ++var17) {
                     byte[] var13 = (byte[])((byte[])var8.get(var17));
                     System.arraycopy(var13, 0, var16, var11, var13.length);
                     var11 += var13.length;
                  }
               }

               return zabl.i;
            }

            throw new CellsException(5, e);
         case 1:
            switch(i.a(var4.toUpperCase())) {
            case 2:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 7;
               return zabl.g;
            case 3:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 0;
               return zabl.g;
            case 4:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 42;
               return zabl.g;
            case 5:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 29;
               return zabl.g;
            case 6:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 36;
               return zabl.g;
            case 7:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 23;
               return zabl.g;
            case 8:
               var1.a(new byte[2]);
               var1.f()[0] = 28;
               var1.f()[1] = 15;
               return zabl.g;
            case 9:
            case 10:
               var1.a(new byte[3]);
               var1.f()[0] = 23;
               return zabl.g;
            case 11:
               var1.a(new byte[2]);
               var1.f()[0] = 29;
               break;
            case 12:
               var1.a(new byte[2]);
               var1.f()[0] = 29;
               var1.f()[1] = 1;
               break;
            case 13:
               var1.a(new byte[1]);
               var1.f()[0] = 21;
               return new int[]{var2};
            default:
               this.a(var1, var2);
            }

            return zabl.h;
         case 2:
         case 3:
         default:
            zabd var15;
            switch(i.a(var4)) {
            case 0:
               if (var1.d() != null && var1.d().size() >= 2 && var1.d().size() <= 4) {
                  var5 = this.a(var1, 29, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 1:
               if (var1.d() == null || var1.d().size() != 2 && var1.d().size() != 3) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 1, var2, var3);
               break;
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
            default:
               if (var1.i() != 3 && var1.i() != 4) {
                  this.a(var1, var2);
                  var5 = zabl.g;
               } else {
                  var5 = this.b(var1, var2, var3);
               }
               break;
            case 11:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 35, var2, var3);
               break;
            case 12:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 34, var2, var3);
               break;
            case 13:
               var1.a(zasg.d);
               var5 = new int[]{var2};
               break;
            case 14:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var1.a(zasg.r);
               var5 = zabl.h;
               break;
            case 15:
               if (var1.d() == null || var1.d().size() == 0 || var1.d().size() > 2) {
                  throw new CellsException(5, e);
               }

               if (var1.d().size() == 1) {
                  var1.a(zasg.a);
               }

               if (var1.d().size() == 2) {
                  var1.a(zasg.f);
               }

               var5 = zabl.g;
               break;
            case 16:
               if (var1.d() == null || var1.d().size() == 0 || var1.d().size() > 2) {
                  throw new CellsException(5, e);
               }

               if (var1.d().size() == 1) {
                  var1.a(zasg.b);
               }

               if (var1.d().size() == 2) {
                  var1.a(zasg.g);
               }

               var5 = zabl.g;
               break;
            case 17:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var1.a(zasg.h);
               var5 = zabl.g;
               break;
            case 18:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var1.a(zasg.i);
               var5 = zabl.g;
               break;
            case 19:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var1.a(zasg.j);
               var5 = zabl.g;
               break;
            case 20:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var1.a(zasg.k);
               var5 = zabl.g;
               break;
            case 21:
               var1.a(zasg.s);
               var5 = zabl.h;
               break;
            case 22:
               if (var1.d() != null && var1.d().size() == 2) {
                  var1.a(zasg.t);
                  var5 = zabl.h;
                  break;
               }

               throw new CellsException(5, e);
            case 23:
               var1.a(zasg.c);
               var5 = zabl.g;
               break;
            case 24:
               var1.a(zasg.l);
               var5 = zabl.g;
               break;
            case 25:
               var1.a(zasg.n);
               var5 = zabl.g;
               break;
            case 26:
               var1.a(zasg.m);
               var5 = zabl.g;
               break;
            case 27:
               var1.a(zasg.o);
               var5 = zabl.g;
               break;
            case 28:
               var1.a(zasg.p);
               var5 = zabl.g;
               break;
            case 29:
               var1.a(zasg.q);
               var5 = zabl.g;
               break;
            case 30:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 24, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 31:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 99, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 32:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 233, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 33:
               var5 = this.a(var1, 219, var2, var3);
               break;
            case 34:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 214, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 35:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 98, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 36:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 232, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 37:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 36, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 38:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.a(var1, 18, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 39:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 18, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 40:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 97, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 41:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 234, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 42:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 269, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 43:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 5, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 44:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 361, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 45:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var5 = this.a(var1, 270, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 46:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var5 = this.a(var1, 272, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 47:
               if (var1.d() != null && var1.d().size() == 4) {
                  var5 = this.b(var1, 273, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 48:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var5 = this.a(var1, 125, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 49:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 288, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 50:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 111, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 51:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 274, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 52:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 275, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 53:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 306, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 54:
               if (var1.d() != null && var1.d().size() >= 1) {
                  var5 = this.a(var1, 100, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 55:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 162, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 56:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 121, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 57:
               if (var1.d() != null && var1.d().size() > 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 9, var2, var3);
               break;
            case 58:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 77, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 59:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 276, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 60:
               if (var1.d() != null && var1.d().size() >= 1) {
                  var5 = this.a(var1, 336, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 61:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 277, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 62:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 307, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 63:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 16, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 64:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 230, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 65:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 0, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 66:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 169, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 67:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 347, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 68:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 346, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 69:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 308, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 70:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 278, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 71:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 65, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 72:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 351, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 73:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 352, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 74:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 140, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 75:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 42, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 76:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var5 = this.a(var1, 220, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 77:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 40, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 78:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 199, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 79:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 67, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 80:
               if (var1.d() == null || var1.d().size() != 4 && var1.d().size() != 5) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 247, var2, var3);
               break;
            case 81:
               if (var1.d() != null && (var1.d().size() == 4 || var1.d().size() == 5)) {
                  var5 = this.a(var1, 144, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 82:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 235, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 83:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 343, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 84:
               if (var1.d() == null) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 318, var2, var3);
               break;
            case 85:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 44, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 86:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 43, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 87:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var5 = this.a(var1, 204, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 88:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 189, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 89:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 45, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 90:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 195, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 91:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 41, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 92:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 47, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 93:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 196, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 94:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 261, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 95:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 279, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 96:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 117, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 97:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 21, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 98:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 280, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 99:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 184, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 100:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 281, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 101:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 282, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 102:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var5 = this.a(var1, 124, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 103:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var5 = this.a(var1, 205, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 104:
               if (var1.d() != null && var1.d().size() >= 1 && var1.d().size() <= 3) {
                  var5 = this.a(var1, 14, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 105:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 285, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 106:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 309, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 107:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 252, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 108:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 310, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 109:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var5 = this.a(var1, 57, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 110:
               if (var1.d() != null && var1.d().size() == 4) {
                  var5 = this.b(var1, 286, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 111:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 287, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 112:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 271, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 113:
               if (var1.d() == null) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 319, var2, var3);
               break;
            case 114:
               if (var1.d() != null && var1.d().size() >= 2) {
                  var5 = this.a(var1, 358, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 115:
               if (var1.d() == null) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 320, var2, var3);
               break;
            case 116:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 4) {
                  var5 = this.a(var1, 101, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 117:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 71, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 118:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 1)) {
                  var5 = this.a(var1, 359, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 119:
               if (var1.d() != null && var1.d().size() == 4) {
                  var5 = this.b(var1, 289, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 120:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var5 = this.a(var1, 148, var2, var3);
                  this.b(true);
                  break;
               }

               throw new CellsException(5, e);
            case 121:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.a(var1, 244, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 122:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 25, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 123:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 311, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 124:
               if (var1.d() != null && var1.d().size() >= 4 && var1.d().size() <= 6) {
                  var5 = this.a(var1, 167, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 125:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var5 = this.a(var1, 62, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 126:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 129, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 127:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 126, var2, var3);
               break;
            case 128:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 198, var2, var3);
               break;
            case 129:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 3, var2, var3);
               break;
            case 130:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 2, var2, var3);
               break;
            case 131:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 190, var2, var3);
               break;
            case 132:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 128, var2, var3);
               break;
            case 133:
               if (var1.d() == null || var1.d().size() != 4) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 350, var2, var3);
               break;
            case 134:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 105, var2, var3);
               break;
            case 135:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 127, var2, var3);
               break;
            case 136:
               if (var1.d() == null) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 322, var2, var3);
               break;
            case 137:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 325, var2, var3);
               break;
            case 138:
               if (var1.d() == null || var1.d().size() != 1 && var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 115, var2, var3);
               break;
            case 139:
               if (var1.d() == null || var1.d().size() != 1 && var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 208, var2, var3);
               break;
            case 140:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 32, var2, var3);
               break;
            case 141:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 211, var2, var3);
               break;
            case 142:
               if (var1.d() == null || var1.d().size() == 0 || var1.d().size() > 4) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 49, var2, var3);
               break;
            case 143:
               var5 = this.b(var1, 22, var2, var3);
               break;
            case 144:
               if (var1.d() == null || var1.d().size() < 1 || var1.d().size() > 2) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 109, var2, var3);
               break;
            case 145:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 23, var2, var3);
               break;
            case 146:
               if (var1.d() == null || var1.d().size() != 3) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 290, var2, var3);
               break;
            case 147:
               if (var1.d() == null || var1.d().size() != 3) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 291, var2, var3);
               break;
            case 148:
               if (var1.d() != null && var1.d().size() <= 4 && var1.d().size() >= 1) {
                  var5 = this.a(var1, 51, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 149:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 292, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 150:
               if (var1.d() == null || var1.d().size() != 2 && var1.d().size() != 3) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 28, var2, var3);
               break;
            case 151:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 112, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 152:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var5 = this.a(var1, 64, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 153:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 7, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 154:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 362, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 155:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 227, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 156:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.a(var1, 163, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 157:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.a(var1, 164, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 158:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 31, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 159:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 210, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 160:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 6, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 161:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 363, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 162:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 72, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 163:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 61, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 164:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 165, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 165:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 39, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 166:
               if (var1.d() == null) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 330, var2, var3);
               break;
            case 167:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 68, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 168:
               var5 = this.b(var1, 131, var2, var3);
               break;
            case 169:
               var5 = this.b(var1, 10, var2, var3);
               break;
            case 170:
               if (var1.d() != null && var1.d().size() == 4) {
                  var5 = this.b(var1, 293, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 171:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 294, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 172:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 295, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 173:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 296, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 174:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 38, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 175:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 74, var2, var3);
               break;
            case 176:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 353, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 177:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var5 = this.a(var1, 58, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 178:
               if (var1.d() != null && var1.d().size() >= 2) {
                  var5 = this.a(var1, 11, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 179:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 298, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 180:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var5 = this.a(var1, 78, var2, var3);
                  this.b(true);
                  break;
               }

               throw new CellsException(5, e);
            case 181:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 37, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 182:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 312, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 183:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 328, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 184:
               if (var1.d() != null && var1.d().size() >= 2 && var1.d().size() <= 3) {
                  var5 = this.a(var1, 329, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 185:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 299, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 186:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 360, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 187:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 19, var2, var3);
               break;
            case 188:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var5 = this.a(var1, 59, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 189:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 300, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 190:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 337, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 191:
               if (var1.d() != null && var1.d().size() >= 4 && var1.d().size() <= 6) {
                  var5 = this.a(var1, 168, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 192:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 4) {
                  var5 = this.a(var1, 317, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 193:
               if (var1.d() != null && var1.d().size() >= 1) {
                  var5 = this.a(var1, 183, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 194:
               if (var1.d() != null && var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 114, var2, var3);
               break;
            case 195:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 5) {
                  var5 = this.a(var1, 56, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 196:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 327, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 197:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 342, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 198:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 63, var2, var3);
               break;
            case 199:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var5 = this.a(var1, 216, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 200:
               if (var1.d() != null && var1.d().size() >= 3 && var1.d().size() <= 6) {
                  var5 = this.a(var1, 60, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 201:
               if (var1.d() != null && var1.d().size() == 4) {
                  var5 = this.b(var1, 119, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 202:
               if (var1.d() != null && var1.d().size() == 4) {
                  var5 = this.b(var1, 207, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 203:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 30, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 204:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var5 = this.a(var1, 116, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 205:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var5 = this.a(var1, 209, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 206:
               if (var1.d() != null && (var1.d().size() == 1 || var1.d().size() == 2)) {
                  var5 = this.a(var1, 354, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 207:
               if (var1.d() == null) {
                  throw new CellsException(5, e);
               }

               if (var1.d().size() == 1) {
                  var15 = new zabd();
                  var15.a("0");
                  var15.a(1);
                  var1.a(var15);
               }

               if (var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 27, var2, var3);
               break;
            case 208:
               if (var1.d() == null) {
                  throw new CellsException(5, e);
               }

               if (var1.d().size() == 1) {
                  var15 = new zabd();
                  var15.a("0");
                  var15.a(1);
                  var1.a(var15);
               }

               if (var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 213, var2, var3);
               break;
            case 209:
               if (var1.d() == null) {
                  throw new CellsException(5, e);
               }

               if (var1.d().size() == 1) {
                  var15 = new zabd();
                  var15.a("0");
                  var15.a(1);
                  var1.a(var15);
               }

               if (var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 212, var2, var3);
               break;
            case 210:
               if (var1.d() != null && var1.d().size() > 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 8, var2, var3);
               break;
            case 211:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 76, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 212:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 313, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 213:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var5 = this.a(var1, 82, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 214:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var5 = this.a(var1, 206, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 215:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 73, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 216:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 26, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 217:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 15, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 218:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 229, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 219:
               if (var1.d() == null) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 323, var2, var3);
               break;
            case 220:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 142, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 221:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 326, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 222:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 20, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 223:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 297, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 224:
            case 225:
            case 226:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 12, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 227:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 366, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 228:
            case 229:
            case 230:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 193, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 231:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 364, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 232:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 314, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 233:
               if (var1.d() != null && (var1.d().size() == 3 || var1.d().size() == 4)) {
                  var5 = this.a(var1, 120, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 234:
               if (var1.d() != null && var1.d().size() >= 2) {
                  var5 = this.a(var1, 344, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 235:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.c(var1, var2);
                  break;
               }

               throw new CellsException(5, e);
            case 236:
               if (var1.d() != null && var1.d().size() != 0) {
                  var5 = this.a(var1, 228, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 237:
               if (var1.d() != null && (var1.d().size() == 2 || var1.d().size() == 3)) {
                  var5 = this.a(var1, 345, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 238:
               if (var1.d() != null && var1.d().size() > 30) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 321, var2, var3);
               break;
            case 239:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 304, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 240:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 305, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 241:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 303, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 242:
               if (var1.d() != null && var1.d().size() == 4) {
                  var5 = this.b(var1, 143, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 243:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 130, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 244:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 17, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 245:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 231, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 246:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 301, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 247:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 48, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 248:
               if (var1.d() != null && var1.d().size() == 3) {
                  var5 = this.b(var1, 66, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 249:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 141, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 250:
               if (var1.d() != null && var1.d().size() == 2) {
                  var5 = this.b(var1, 332, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 251:
               if (var1.d() != null && var1.d().size() != 0) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 221, var2, var3);
               break;
            case 252:
               if (var1.d() != null && var1.d().size() == 1) {
                  var5 = this.b(var1, 83, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 253:
               if (var1.d() != null && var1.d().size() >= 1 && var1.d().size() <= 4) {
                  var5 = this.a(var1, 50, var2, var3);
                  break;
               }

               throw new CellsException(5, e);
            case 254:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 118, var2, var3);
               break;
            case 255:
               if (var1.d() == null || var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 331, var2, var3);
               break;
            case 256:
               if (var1.d() == null || var1.d().size() != 1 && var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 197, var2, var3);
               break;
            case 257:
               if (var1.d() == null || var1.d().size() != 4) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 316, var2, var3);
               break;
            case 258:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 86, var2, var3);
               break;
            case 259:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 113, var2, var3);
               break;
            case 260:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 33, var2, var3);
               break;
            case 261:
               if (var1.d() == null || var1.d().size() <= 0) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 46, var2, var3);
               break;
            case 262:
               if (var1.d() == null || var1.d().size() <= 0) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 367, var2, var3);
               break;
            case 263:
               if (var1.d() == null || var1.d().size() <= 0) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 194, var2, var3);
               break;
            case 264:
               if (var1.d() == null || var1.d().size() <= 0) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 365, var2, var3);
               break;
            case 265:
               if (var1.d() == null || var1.d().size() <= 0) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 222, var2, var3);
               break;
            case 266:
               if (var1.d() == null || var1.d().size() < 3 || var1.d().size() > 4) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 102, var2, var3);
               break;
            case 267:
               if (var1.d() == null || var1.d().size() != 1 && var1.d().size() != 2) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 70, var2, var3);
               break;
            case 268:
               if (var1.d() == null || var1.d().size() != 4) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 302, var2, var3);
               break;
            case 269:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 215, var2, var3);
               break;
            case 270:
               if (var1.d() == null || var1.d().size() != 1) {
                  throw new CellsException(5, e);
               }

               var5 = this.b(var1, 69, var2, var3);
               break;
            case 271:
               if (var1.d() == null || var1.d().size() < 2 || var1.d().size() > 3) {
                  throw new CellsException(5, e);
               }

               var5 = this.a(var1, 324, var2, var3);
            }

            return var5;
         case 4:
            int var6 = var1.d() == null ? 0 : var1.d().size();
            if (var6 > 254) {
               throw new CellsException(5, e);
            } else {
               var1.a(new byte[4]);
               switch(var2) {
               case 32:
                  var1.f()[0] = 34;
                  break;
               case 64:
                  var1.f()[0] = 66;
                  break;
               case 96:
                  var1.f()[0] = 98;
               }

               var1.f()[1] = (byte)(var6 + 1);
               var1.f()[2] = -1;
               return zabl.h;
            }
         }
      }
   }

   private void a(zabd var1, int var2) {
      String var3 = var1.b();
      byte[] var14;
      if (var3.charAt(0) == '"' && var3.charAt(var3.length() - 1) == '"') {
         try {
            int var9 = var3.length() - 2;
            if (var9 == 0) {
               var1.a(new byte[3]);
               var1.f()[0] = 23;
            } else {
               if (this.d.n().getSettings().c) {
                  var3 = zase.b(var3);
                  var9 = var3.length() - 2;
               }

               var14 = Encoding.getUnicode().a(var3);
               var1.a(new byte[3 + var9 * 2]);
               var1.f()[0] = 23;
               System.arraycopy(com.aspose.cells.b.a.zc.a(var9), 0, var1.f(), 1, 2);
               System.arraycopy(var14, 2, var1.f(), 3, var9 + var9);
            }
         } catch (Exception var8) {
            throw new CellsException(5, "Invalid formula");
         }
      } else {
         boolean var4 = zapb.b(var3);
         int var7;
         if (var4) {
            double var5 = com.aspose.cells.b.a.zn.a(var3, com.aspose.cells.b.a.c.za.b());
            if (var5 >= 0.0D && var5 <= 65535.0D && var5 - (double)((int)var5 & '\uffff') <= Double.MIN_VALUE) {
               var7 = (int)var5;
               var1.a(new byte[3]);
               var1.f()[0] = 30;
               System.arraycopy(com.aspose.cells.b.a.zc.a(var7), 0, var1.f(), 1, 2);
            } else {
               var1.a(new byte[9]);
               var1.f()[0] = 31;
               System.arraycopy(com.aspose.cells.b.a.zc.a(var5), 0, var1.f(), 1, 8);
            }
         } else {
            if (this.c(var1.b())) {
               int[] var15 = zbqf.a(this.d, var1.b());
               var1.a(new byte[7]);
               switch(var2) {
               case 32:
                  var1.f()[0] = 57;
                  break;
               case 64:
                  var1.f()[0] = 89;
                  break;
               case 96:
                  var1.f()[0] = 121;
               }

               System.arraycopy(com.aspose.cells.b.a.zc.a(var15[0]), 0, var1.f(), 1, 2);
               System.arraycopy(com.aspose.cells.b.a.zc.a(var15[1]), 0, var1.f(), 3, 2);
               return;
            }

            if (this.d.a() != null) {
               Object var11 = null;
               boolean var16;
               if (this.d.a() instanceof zauk) {
                  zauk var12 = (zauk)this.d.a();
                  var16 = true;
                  var7 = var12.a(var1.b());
                  if (var7 == -1) {
                     throw new CellsException(12, "References,names,and arrays are not supported in the PivotTable formulas.");
                  }

                  var14 = new byte[]{24, 29, 0, 0, 0, 0};
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var7), 0, var14, 2, 4);
                  var1.a(var14);
               } else if (this.d.a() instanceof zaus) {
                  zaus var13 = (zaus)this.d.a();
                  var16 = true;
                  var7 = var13.a(var1.b());
                  if (var7 == -1) {
                     throw new CellsException(12, "Pivot table can only refer to items in the same field as calcualted item");
                  }

                  var14 = new byte[]{24, 29, 0, 0, 0, 0};
                  System.arraycopy(com.aspose.cells.b.a.zc.a(var7), 0, var14, 2, 4);
                  var1.a(var14);
               }

               return;
            }

            boolean var10;
            if (this.b(var1.b())) {
               var10 = false;
               boolean[] var6 = new boolean[]{var10};
               var1.a(zbsg.a(this.d, this.c, this.f, this.g, var1.b(), var2, var6));
               var10 = var6[0];
               if (var10) {
                  this.a(true);
               }

               return;
            }

            var10 = this.d(var1.b());
            if (!var10) {
               var1.a(this.b(var1, var2));
            } else {
               var1.a(this.a(var1, var1.b(), var2));
            }
         }

      }
   }

   int[] a(String var1) {
      return zyn.a(this.d, var1);
   }

   void a(byte[] var1, int var2) {
      System.arraycopy(com.aspose.cells.b.a.zc.a(var2), 0, var1, 1, 2);
   }

   byte[] a(zabd var1, String var2, int var3) {
      byte var4 = 0;
      byte var5 = 0;
      boolean var7 = false;
      boolean var8 = false;
      boolean var9 = false;
      boolean var10 = false;

      try {
         int var11 = zyn.a(var2, '!');
         byte[] var6;
         if (var11 == var2.length() - 1) {
            var6 = new byte[]{28, 23};
            return var6;
         } else {
            int var26;
            int var27;
            if (var11 == -1 && !this.b()) {
               int[] var28 = new int[]{var4};
               int[] var29 = new int[]{var5};
               boolean[] var31 = new boolean[]{var8};
               boolean[] var33 = new boolean[]{var7};
               boolean[] var34 = new boolean[]{var9};
               boolean[] var35 = new boolean[]{var10};
               boolean var36 = !a(var2, var28, var29, false, var31, var33, var34, var35);
               var26 = var28[0];
               var27 = var29[0];
               var8 = var31[0];
               var7 = var33[0];
               var9 = var34[0];
               var10 = var35[0];
               if (var36) {
                  return this.c(var1, var2, var3);
               } else {
                  var6 = new byte[7];
                  zcew.a(var6, 1, var26, this.f, var8, this.a());
                  zcew.c(var6, 5, var27, this.g, var7, this.a());
                  if (!var7) {
                     var6[6] = (byte)(var6[6] | 64);
                  }

                  if (!var8) {
                     var6[6] = (byte)(var6[6] | 128);
                  }

                  if (this.a()) {
                     switch(var3) {
                     case 32:
                        var6[0] = 44;
                        break;
                     case 64:
                        var6[0] = 76;
                        break;
                     case 96:
                        var6[0] = 108;
                     }
                  } else {
                     switch(var3) {
                     case 32:
                        var6[0] = 36;
                        break;
                     case 64:
                        var6[0] = 68;
                        break;
                     case 96:
                        var6[0] = 100;
                     }
                  }

                  return var6;
               }
            } else {
               String var12 = "";
               String var13 = null;
               boolean var14 = true;
               boolean var15 = true;
               int var16;
               int var17;
               int[] var18;
               int var30;
               int var32;
               if (var11 != -1) {
                  if (var11 != 0) {
                     var12 = var2.substring(0, 0 + var11);
                  }

                  var18 = this.a(var12);
                  var30 = var18[0];
                  var32 = var18[1];
                  var16 = var18[2];
                  var17 = var18[3];
                  var13 = var2.substring(var11 + 1);
               } else {
                  var32 = this.d.u();
                  var17 = this.c;
                  var16 = this.c;
                  var30 = this.d.q().f(var32, var16, var17);
                  var13 = var2;
               }

               if (var30 == -1) {
                  return this.c(var1, var2, var3);
               } else {
                  var18 = new int[]{var4};
                  int[] var19 = new int[]{var5};
                  boolean[] var20 = new boolean[]{var8};
                  boolean[] var21 = new boolean[]{var7};
                  boolean[] var22 = new boolean[]{var9};
                  boolean[] var23 = new boolean[]{var10};
                  boolean var24 = !a(var13, var18, var19, false, var20, var21, var22, var23);
                  var26 = var18[0];
                  var27 = var19[0];
                  var8 = var20[0];
                  var7 = var21[0];
                  var9 = var22[0];
                  var10 = var23[0];
                  if (var24) {
                     if ("#REF!".equals(var13)) {
                        var6 = new byte[9];
                        switch(var3) {
                        case 32:
                           var6[0] = 60;
                           break;
                        case 64:
                           var6[0] = 92;
                           break;
                        case 96:
                           var6[0] = 124;
                        }

                        this.a(var6, var30);
                        return var6;
                     } else {
                        return this.a(var1, var2, var32, var30, var16, var13, var1.i(), var3);
                     }
                  } else {
                     var6 = new byte[9];
                     if (this.b()) {
                        var7 = true;
                        var8 = true;
                     }

                     zcew.a(var6, 3, var26, this.f, var8, this.a());
                     zcew.c(var6, 7, var27, this.g, var7, this.a());
                     if (!var7) {
                        var6[8] = (byte)(var6[8] | 64);
                     }

                     if (!var8) {
                        var6[8] = (byte)(var6[8] | 128);
                     }

                     switch(var3) {
                     case 32:
                        var6[0] = 58;
                        break;
                     case 64:
                        var6[0] = 90;
                        break;
                     case 96:
                        var6[0] = 122;
                     }

                     this.a(var6, var30);
                     return var6;
                  }
               }
            }
         }
      } catch (Exception var25) {
         return this.c(var1, var2, var3);
      }
   }

   private byte[] b(zabd var1, int var2) {
      int var3 = var1.b().indexOf(58);
      if (var3 == -1) {
         return this.a(var1, var1.b(), var2);
      } else {
         int var4 = var1.b().lastIndexOf(58);
         if (var3 != var1.b().length() - 1 && var1.b().charAt(var3 + 1) == '\\') {
            var3 = var4;
         }

         int var5 = var1.b().lastIndexOf(33);
         String var6;
         String var7;
         if (var3 == var4) {
            var6 = var1.b().substring(0, 0 + var3);
            var7 = com.aspose.cells.b.a.zv.a(var1.b().substring(var3 + 1));
            if (var6 != null && var7 != null) {
               var5 = var6.lastIndexOf(33);
               return var5 == -1 ? this.a(var1, var6, var7, var2) : this.a(var1, var6, var7, var5, var2);
            } else {
               return null;
            }
         } else if (var5 == -1) {
            String[] var15 = com.aspose.cells.b.a.zv.d(var1.b(), ':');
            ArrayList var9 = new ArrayList();
            int var10 = 0;

            for(int var11 = 0; var11 < var15.length; var11 += 2) {
               Object var12 = null;
               byte[] var17;
               if (var11 + 1 >= var15.length) {
                  var17 = this.a(var1, var15[var11], var2);
               } else {
                  var17 = this.a(var1, var15[var11], var15[var11 + 1], var2);
               }

               com.aspose.cells.b.a.a.ze.a(var9, (Object)var17);
               var10 += var17.length;
               if (var11 != 0) {
                  ++var10;
               }
            }

            byte[] var16 = new byte[var10];
            int var18 = 0;

            for(int var13 = 0; var13 < var9.size(); ++var13) {
               byte[] var14 = (byte[])((byte[])var9.get(var13));
               System.arraycopy(var14, 0, var16, var18, var14.length);
               var18 += var14.length;
               if (var13 != 0) {
                  var16[var18++] = 17;
               }
            }

            return var16;
         } else {
            String var8 = var1.b().substring(0, 0 + var5);
            var6 = var1.b().substring(var5 + 1, var5 + 1 + (var4 - var5 - 1));
            var7 = var1.b().substring(var4 + 1);
            return this.a(var1, var8, var6, var7, var2);
         }
      }
   }

   byte[] a(zabd var1, String var2, String var3, int var4) {
      byte[] var5 = new byte[13];
      boolean var6 = false;
      boolean var7 = false;
      boolean var8 = false;
      boolean var9 = false;
      byte var10 = 0;
      byte var11 = 0;
      boolean var12 = false;
      boolean var13 = false;
      boolean var14 = false;
      boolean var15 = false;
      byte var16 = 0;
      byte var17 = 0;

      try {
         int[] var18 = new int[]{var10};
         int[] var19 = new int[]{var11};
         boolean[] var20 = new boolean[]{var6};
         boolean[] var21 = new boolean[]{var7};
         boolean[] var22 = new boolean[]{var8};
         boolean[] var23 = new boolean[]{var9};
         boolean var24 = a(var2, var18, var19, true, var20, var21, var22, var23);
         int var35 = var18[0];
         int var36 = var19[0];
         var6 = var20[0];
         var7 = var21[0];
         var8 = var22[0];
         var9 = var23[0];
         int[] var25 = new int[]{var16};
         int[] var26 = new int[]{var17};
         boolean[] var27 = new boolean[]{var12};
         boolean[] var28 = new boolean[]{var13};
         boolean[] var29 = new boolean[]{var14};
         boolean[] var30 = new boolean[]{var15};
         boolean var31 = a(var3, var25, var26, true, var27, var28, var29, var30);
         int var37 = var25[0];
         int var38 = var26[0];
         var12 = var27[0];
         var13 = var28[0];
         var14 = var29[0];
         var15 = var30[0];
         if (!var24 || !var31 || var8 != var14 || var9 != var15) {
            if (var4 != 96) {
               var4 = 32;
            }

            var1.a(var2);
            var1.a((byte[])null);
            byte[] var32 = this.a(var1, var1.b(), var4);
            var1.a(var3);
            var1.a((byte[])null);
            byte[] var33 = this.a(var1, var1.b(), var4);
            var5 = new byte[var32.length + var33.length + 1];
            System.arraycopy(var32, 0, var5, 0, var32.length);
            System.arraycopy(var33, 0, var5, var32.length, var33.length);
            var5[var5.length - 1] = 17;
            return var5;
         }

         if (this.b()) {
            var13 = true;
            var7 = true;
            var12 = true;
            var6 = true;
         }

         if (var8) {
            zcew.a(var5, 1, var35, this.f, var6, this.a());
            zcew.a(var5, 5, var37, this.f, var12, this.a());
            System.arraycopy(com.aspose.cells.b.a.zc.a((int)16383), 0, var5, 11, 2);
            if (!var6) {
               var5[10] = (byte)(var5[10] | 128);
            }

            if (!var12) {
               var5[12] = (byte)(var5[12] | 128);
            }
         } else if (var9) {
            System.arraycopy(com.aspose.cells.b.a.zc.a(1048575), 0, var5, 5, 4);
            zcew.c(var5, 9, var36, this.g, var7, this.a());
            zcew.c(var5, 11, var38, this.g, var13, this.a());
            if (!var7) {
               var5[10] = (byte)(var5[10] | 64);
            }

            if (!var13) {
               var5[12] = (byte)(var5[12] | 64);
            }
         } else {
            zcew.a(var5, 1, var35, this.f, var6, this.a());
            zcew.a(var5, 5, var37, this.f, var12, this.a());
            zcew.c(var5, 9, var36, this.g, var7, this.a());
            zcew.c(var5, 11, var38, this.g, var13, this.a());
            if (!var6) {
               var5[10] = (byte)(var5[10] | 128);
            }

            if (!var7) {
               var5[10] = (byte)(var5[10] | 64);
            }

            if (!var12) {
               var5[12] = (byte)(var5[12] | 128);
            }

            if (!var13) {
               var5[12] = (byte)(var5[12] | 64);
            }
         }
      } catch (Exception var34) {
         throw new CellsException(5, e);
      }

      if (this.b()) {
         byte[] var39 = new byte[var5.length + 2];
         int var40 = this.d.q().f(this.d.u(), this.c, this.c);
         System.arraycopy(com.aspose.cells.b.a.zc.a(var40), 0, var39, 1, 2);
         System.arraycopy(var5, 1, var39, 3, var5.length - 1);
         switch(var4) {
         case 32:
            var39[0] = 59;
            break;
         case 64:
            var39[0] = 91;
            break;
         case 96:
            var39[0] = 123;
         }

         return var39;
      } else {
         if (this.a()) {
            switch(var4) {
            case 32:
               var5[0] = 45;
               break;
            case 64:
               var5[0] = 77;
               break;
            case 96:
               var5[0] = 109;
            }
         } else {
            switch(var4) {
            case 32:
               var5[0] = 37;
               break;
            case 64:
               var5[0] = 69;
               break;
            case 96:
               var5[0] = 101;
            }
         }

         return var5;
      }
   }

   private byte[] a(zabd var1, String var2, String var3, String var4, int var5) {
      try {
         int[] var9 = this.a(var2);
         int var10 = var9[0];
         int var6 = var9[1];
         int var7 = var9[2];
         int var8 = var9[3];
         byte[] var11 = new byte[15];
         boolean var12 = false;
         boolean var13 = false;
         boolean var14 = false;
         boolean var15 = false;
         byte var16 = 0;
         byte var17 = 0;
         boolean var18 = false;
         boolean var19 = false;
         boolean var20 = false;
         boolean var21 = false;
         byte var22 = 0;
         byte var23 = 0;

         try {
            int[] var24 = new int[]{var16};
            int[] var25 = new int[]{var17};
            boolean[] var26 = new boolean[]{var12};
            boolean[] var27 = new boolean[]{var13};
            boolean[] var28 = new boolean[]{var14};
            boolean[] var29 = new boolean[]{var15};
            boolean var30 = a(var3, var24, var25, true, var26, var27, var28, var29);
            int var42 = var24[0];
            int var43 = var25[0];
            var12 = var26[0];
            var13 = var27[0];
            var14 = var28[0];
            var15 = var29[0];
            int[] var31 = new int[]{var22};
            int[] var32 = new int[]{var23};
            boolean[] var33 = new boolean[]{var18};
            boolean[] var34 = new boolean[]{var19};
            boolean[] var35 = new boolean[]{var20};
            boolean[] var36 = new boolean[]{var21};
            boolean var37 = a(var4, var31, var32, true, var33, var34, var35, var36);
            int var44 = var31[0];
            int var45 = var32[0];
            var18 = var33[0];
            var19 = var34[0];
            var20 = var35[0];
            var21 = var36[0];
            if (!var30 || !var37 || var14 != var20 || var15 != var21) {
               if (var5 != 96) {
                  var5 = 32;
               }

               var1.a(var3);
               var1.a((byte[])null);
               byte[] var38 = this.a(var1, var1.b(), var5);
               var1.a(var4);
               var1.a((byte[])null);
               byte[] var39 = this.a(var1, var1.b(), var5);
               var11 = new byte[var38.length + var39.length + 1];
               System.arraycopy(var38, 0, var11, 0, var38.length);
               System.arraycopy(var39, 0, var11, var38.length, var39.length);
               var11[var11.length - 1] = 17;
               return var11;
            }

            if (var14) {
               zcew.a(var11, 3, var42, this.f, var12, this.a());
               zcew.a(var11, 7, var44, this.f, var18, this.a());
               System.arraycopy(com.aspose.cells.b.a.zc.a((int)16383), 0, var11, 11, 2);
               if (!var12) {
                  var11[12] = (byte)(var11[12] | 128);
               }

               if (!var18) {
                  var11[14] = (byte)(var11[14] | 128);
               }
            } else if (var15) {
               System.arraycopy(com.aspose.cells.b.a.zc.a(1048575), 0, var11, 7, 4);
               zcew.c(var11, 11, var43, this.g, var13, this.a());
               zcew.c(var11, 13, var45, this.g, var19, this.a());
               if (!var13) {
                  var11[12] = (byte)(var11[12] | 64);
               }

               if (!var19) {
                  var11[14] = (byte)(var11[14] | 64);
               }
            } else {
               zcew.a(var11, 3, var42, this.f, var12, this.a());
               zcew.a(var11, 7, var44, this.f, var18, this.a());
               zcew.c(var11, 11, var43, this.g, var13, this.a());
               zcew.c(var11, 13, var45, this.g, var19, this.a());
               if (!var12) {
                  var11[12] = (byte)(var11[12] | 128);
               }

               if (!var13) {
                  var11[12] = (byte)(var11[12] | 64);
               }

               if (!var18) {
                  var11[14] = (byte)(var11[14] | 128);
               }

               if (!var19) {
                  var11[14] = (byte)(var11[14] | 64);
               }
            }
         } catch (Exception var40) {
            throw new CellsException(5, e);
         }

         switch(var5) {
         case 32:
            var11[0] = 59;
            break;
         case 64:
            var11[0] = 91;
            break;
         case 96:
            var11[0] = 123;
         }

         this.a(var11, var10);
         return var11;
      } catch (Exception var41) {
         throw new CellsException(5, e);
      }
   }

   private byte[] a(zabd var1, String var2, String var3, int var4, int var5) {
      byte[] var44;
      if (var3.indexOf("!") != -1) {
         byte[] var40 = this.a(var1, (String)var2, 32);
         byte[] var45 = this.a(var1, (String)var3, 32);
         var44 = new byte[var40.length + var45.length + 1];
         System.arraycopy(var40, 0, var44, 0, var40.length);
         System.arraycopy(var45, 0, var44, var40.length, var45.length);
         var44[var44.length - 1] = 17;
         return var44;
      } else {
         int var6 = 0;
         int var7;
         if (this.d.v() != null && this.d.v().getCount() != 0) {
            for(var7 = 0; var7 < this.d.v().getCount(); ++var7) {
               zbqg var8 = this.d.v().a(var7);
               if (var8.e()) {
                  var6 = var7;
                  break;
               }
            }
         }

         try {
            boolean var41 = true;
            if (var4 > 0) {
               String var42 = var2.substring(0, 0 + var4);
               boolean var9 = true;
               int[] var12 = this.a(var42);
               var7 = var12[0];
               int var46 = var12[1];
               int var10 = var12[2];
               int var11 = var12[3];
               if (var7 == -1) {
                  var7 = this.d.q().b(var6, -1);
               }
            } else {
               int[] var43 = this.d.v().a(this.d);
               var7 = var43[0];
            }

            var44 = new byte[15];
            String var47 = var2;
            var2 = var2.substring(var4 + 1);
            boolean var48 = false;
            boolean var49 = false;
            boolean var50 = false;
            boolean var13 = false;
            byte var14 = 0;
            byte var15 = 0;
            boolean var16 = false;
            boolean var17 = false;
            boolean var18 = false;
            boolean var19 = false;
            byte var20 = 0;
            byte var21 = 0;

            try {
               int[] var22 = new int[]{var14};
               int[] var23 = new int[]{var15};
               boolean[] var24 = new boolean[]{var48};
               boolean[] var25 = new boolean[]{var49};
               boolean[] var26 = new boolean[]{var50};
               boolean[] var27 = new boolean[]{var13};
               boolean var28 = a(var2, var22, var23, true, var24, var25, var26, var27);
               int var51 = var22[0];
               int var52 = var23[0];
               var48 = var24[0];
               var49 = var25[0];
               var50 = var26[0];
               var13 = var27[0];
               int[] var29 = new int[]{var20};
               int[] var30 = new int[]{var21};
               boolean[] var31 = new boolean[]{var16};
               boolean[] var32 = new boolean[]{var17};
               boolean[] var33 = new boolean[]{var18};
               boolean[] var34 = new boolean[]{var19};
               boolean var35 = a(var3, var29, var30, true, var31, var32, var33, var34);
               int var53 = var29[0];
               int var54 = var30[0];
               var16 = var31[0];
               var17 = var32[0];
               var18 = var33[0];
               var19 = var34[0];
               if (!var28 || !var35 || var50 != var18 || var13 != var19) {
                  if (var5 != 96) {
                     var5 = 32;
                  }

                  var1.a(var47);
                  var1.a((byte[])null);
                  byte[] var36 = this.a(var1, var1.b(), var5);
                  var1.a(var3);
                  var1.a((byte[])null);
                  byte[] var37 = this.a(var1, var1.b(), var5);
                  var44 = new byte[var36.length + var37.length + 1];
                  System.arraycopy(var36, 0, var44, 0, var36.length);
                  System.arraycopy(var37, 0, var44, var36.length, var37.length);
                  var44[var44.length - 1] = 17;
                  return var44;
               }

               if (var50) {
                  zcew.a(var44, 3, var51, this.f, var48, this.a());
                  zcew.a(var44, 7, var53, this.f, var16, this.a());
                  System.arraycopy(com.aspose.cells.b.a.zc.a((int)16383), 0, var44, 13, 2);
                  if (!var48) {
                     var44[12] = (byte)(var44[12] | 128);
                  }

                  if (!var16) {
                     var44[14] = (byte)(var44[14] | 128);
                  }
               } else if (var13) {
                  System.arraycopy(com.aspose.cells.b.a.zc.a(1048575), 0, var44, 7, 4);
                  zcew.c(var44, 11, var52, this.g, var49, this.a());
                  zcew.c(var44, 13, var54, this.g, var17, this.a());
                  if (!var49) {
                     var44[12] = (byte)(var44[12] | 64);
                  }

                  if (!var17) {
                     var44[14] = (byte)(var44[14] | 64);
                  }
               } else {
                  zcew.a(var44, 3, var51, this.f, var48, this.a());
                  zcew.a(var44, 7, var53, this.f, var16, this.a());
                  zcew.c(var44, 11, var52, this.g, var49, this.a());
                  zcew.c(var44, 13, var54, this.g, var17, this.a());
                  if (!var48) {
                     var44[12] = (byte)(var44[12] | 128);
                  }

                  if (!var49) {
                     var44[12] = (byte)(var44[12] | 64);
                  }

                  if (!var16) {
                     var44[14] = (byte)(var44[14] | 128);
                  }

                  if (!var17) {
                     var44[14] = (byte)(var44[14] | 64);
                  }
               }
            } catch (Exception var38) {
               throw new CellsException(5, e);
            }

            switch(var5) {
            case 32:
               var44[0] = 59;
               break;
            case 64:
               var44[0] = 91;
               break;
            case 96:
               var44[0] = 123;
            }

            this.a(var44, var7);
            return var44;
         } catch (Exception var39) {
            throw new CellsException(5, e);
         }
      }
   }

   private int[] c(zabd var1, int var2) {
      if (var1.d() != null && var1.d().size() != 0) {
         if (var1.d().size() > 255) {
            throw new CellsException(5, e);
         }

         var1.a(new byte[4]);
         switch(var2) {
         case 96:
            var1.f()[0] = 98;
            break;
         default:
            var1.f()[0] = 66;
         }

         var1.f()[1] = (byte)var1.d().size();
         var1.f()[2] = 4;
      } else {
         var1.a(new byte[4]);
         var1.f()[0] = 25;
         var1.f()[1] = 16;
      }

      return zabl.h;
   }

   private int[] a(zabd var1, int var2, int var3, int var4) {
      var1.a(new byte[4]);
      switch(var3) {
      case 32:
         var1.f()[0] = 34;
         break;
      case 64:
         var1.f()[0] = 66;
         break;
      case 96:
         var1.f()[0] = 98;
      }

      if (var1.d() != null && var1.d().size() != 0) {
         var1.f()[1] = (byte)var1.d().size();
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var2), 0, var1.f(), 2, 2);
      return zyn.a(var2 & '\uffff', var4, var1);
   }

   private int[] b(zabd var1, int var2, int var3, int var4) {
      var1.a(new byte[3]);
      if (this.a()) {
         var1.f()[0] = 33;
      } else {
         switch(var3) {
         case 32:
            var1.f()[0] = 33;
            break;
         case 64:
            if (zyn.a(var2 & '\uffff', var4) == 96 && var1.c() != null) {
               var1.f()[0] = 97;
            } else {
               var1.f()[0] = 65;
            }
            break;
         case 96:
            var1.f()[0] = 97;
         }
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var2), 0, var1.f(), 1, 2);
      return zyn.a(var2 & '\uffff', var4, var1);
   }

   private void b(zabd var1, String var2, int var3) {
      String var4 = var2;
      int var5 = -1;
      boolean var6 = true;
      int var7 = -1;
      zbqf var8 = this.d.v();
      boolean var9 = false;
      boolean var10 = false;
      zbqg var11 = null;

      int var12;
      for(var12 = 0; var12 < var8.getCount(); ++var12) {
         var11 = var8.a(var12);
         if (var11.f()) {
            var5 = var12;
            var9 = true;
            break;
         }
      }

      int var14;
      zuk var15;
      if (!var9) {
         var11 = new zbqg();
         var11.a(2);
         var15 = new zuk(var11);
         var15.a(var2, true);
         com.aspose.cells.b.a.a.ze.a(var11.b(), (Object)var15);
         var7 = 1;
         this.d.v().a(var11);
         var14 = this.d.q().b(this.d.v().getCount() - 1, 65534, 65534);
      } else {
         var14 = this.d.q().f(var5, 65534, 65534);
         var9 = true;

         for(var12 = 0; var12 < var11.b().size(); ++var12) {
            zuk var13 = (zuk)var11.b().get(var12);
            if (com.aspose.cells.b.a.zv.b(var13.e().toUpperCase(), var4.toUpperCase())) {
               var7 = var12 + 1;
               var10 = true;
               break;
            }
         }

         if (!var10) {
            var15 = new zuk(var11);
            var15.a(var4, true);
            com.aspose.cells.b.a.a.ze.a(var11.b(), (Object)var15);
            var7 = var11.b().size();
         }
      }

      byte[] var16 = new byte[7];
      System.arraycopy(com.aspose.cells.b.a.zc.a(var14), 0, var16, 1, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var7), 0, var16, 3, 2);
      switch(var3) {
      case 32:
         var16[0] = 57;
         break;
      case 64:
         var16[0] = 89;
         break;
      case 96:
         var16[0] = 121;
      }

      var1.a(5);
      var1.a(var16);
   }

   private int[] b(zabd var1, int var2, int var3) {
      String var4 = var1.b();
      boolean var5 = false;
      if (var4.startsWith("_XLFN.")) {
         var4 = var4.substring("_XLFN.".length());
      } else if (var4.startsWith("_XLL.")) {
         var4 = var4.substring("_XLL.".length());
         var5 = true;
      }

      zabl var6 = zabl.a(var4, var3);
      if (var6 == null) {
         if (var5) {
            var1.a(5);
            var1.a = var1.a.substring("_XLL.".length());
            this.b(var1, var1.a, var2);
            return zabl.h;
         } else {
            var1.a(5);
            var1.a(this.d(var1, var1.a, var2));
            switch(i.a(var4)) {
            case 272:
               int[] var7 = new int[var1.d().size()];

               for(int var8 = 0; var8 < var7.length; ++var8) {
                  var7[var8] = var8 % 2 == 0 ? 32 : 64;
               }

               return var7;
            case 273:
               return new int[]{64, 64, 32};
            default:
               return zabl.h;
            }
         }
      } else {
         if ((var6.a & '\uffff') == 255) {
            var1.a(5);
            this.b(var1, var1.a, var2);
         } else if (var6.c != var6.d) {
            var1.a(new byte[4]);
            switch(var2) {
            case 32:
               var1.f()[0] = 34;
               break;
            case 64:
               var1.f()[0] = 66;
               break;
            case 96:
               var1.f()[0] = 98;
            }

            if (var1.d() != null && var1.d().size() != 0) {
               var1.f()[1] = (byte)var1.d().size();
            }

            System.arraycopy(com.aspose.cells.b.a.zc.a(var6.a), 0, var1.f(), 2, 2);
         } else {
            var1.a(new byte[3]);
            if (this.a()) {
               var1.f()[0] = 33;
            } else {
               switch(var2) {
               case 32:
                  var1.f()[0] = 33;
                  break;
               case 64:
                  if (var6.f == 96 && var1.c() != null) {
                     var1.f()[0] = 97;
                     break;
                  }

                  var1.f()[0] = 65;
                  break;
               case 96:
                  var1.f()[0] = 97;
               }
            }

            System.arraycopy(com.aspose.cells.b.a.zc.a(var6.a), 0, var1.f(), 1, 2);
         }

         return var6.e;
      }
   }

   int[] a(zabd var1, String var2) {
      return this.d.getNames().a(this.c, var2, var1.i() == 5, true);
   }

   private byte[] c(zabd var1, String var2, int var3) {
      int var4 = this.d.u();
      String var5 = var2.toUpperCase();

      try {
         byte[] var6;
         if (var1.i() == 3) {
            var1.a(5);
         } else {
            var6 = zbsg.a(this.d, this.c, var2, var3);
            if (var6 != null) {
               return var6;
            }
         }

         int[] var7 = this.a(var1, var5);
         int var8 = var7[0];
         int var9 = var7[1];
         if (var8 != -1) {
            var6 = new byte[7];
            System.arraycopy(com.aspose.cells.b.a.zc.a(var8), 0, var6, 1, 2);
            System.arraycopy(com.aspose.cells.b.a.zc.a(var9 + 1), 0, var6, 3, 4);
            switch(var3) {
            case 32:
               var6[0] = 57;
               break;
            case 64:
               var6[0] = 89;
               break;
            case 96:
               var6[0] = 121;
            }
         } else {
            var6 = new byte[5];
            System.arraycopy(com.aspose.cells.b.a.zc.a(var9 + 1), 0, var6, 1, 4);
            switch(var3) {
            case 32:
               var6[0] = 35;
               break;
            case 64:
               var6[0] = 67;
               break;
            case 96:
               var6[0] = 99;
            }
         }

         if (!this.d()) {
            Name var10 = this.d.getNames().get(var9);
            byte[] var11 = var10.b();
            if (var11 != null && var11.length > 8 && var11[4] == 25 && var11[5] == 1) {
               this.b(true);
            }
         }

         return var6;
      } catch (Exception var12) {
         throw new CellsException(5, e);
      }
   }

   private byte[] d(zabd var1, String var2, int var3) {
      var1.a(5);
      int var4 = this.d.u();

      try {
         int[] var6 = this.d.getNames().a(this.c, var2, true, true);
         int var7 = var6[0];
         int var8 = var6[1];
         byte[] var5;
         if (var7 != -1) {
            var5 = new byte[7];
            System.arraycopy(com.aspose.cells.b.a.zc.a(var7), 0, var5, 1, 2);
            System.arraycopy(com.aspose.cells.b.a.zc.a(var8 + 1), 0, var5, 3, 4);
            switch(var3) {
            case 32:
               var5[0] = 57;
               break;
            case 64:
               var5[0] = 89;
               break;
            case 96:
               var5[0] = 121;
            }
         } else {
            var5 = new byte[5];
            System.arraycopy(com.aspose.cells.b.a.zc.a(var8 + 1), 0, var5, 1, 4);
            switch(var3) {
            case 32:
               var5[0] = 35;
               break;
            case 64:
               if (var1.i() == 5) {
                  var5[0] = 35;
               } else {
                  var5[0] = 67;
               }
               break;
            case 96:
               var5[0] = 99;
            }
         }

         return var5;
      } catch (Exception var9) {
         throw new CellsException(5, e);
      }
   }

   private boolean b(String var1) {
      return var1.length() > 0 && var1.charAt(var1.length() - 1) == ']';
   }

   private boolean c(String var1) {
      return var1.length() > 0 && var1.charAt(0) != '\'' && var1.indexOf(124) != -1;
   }

   private boolean d(String var1) {
      int var2 = var1.length() - 1;

      while(var2 >= 0) {
         switch(var1.charAt(var2)) {
         case '!':
            return true;
         case '"':
         case '\'':
            char var3 = var1.charAt(var2);
            --var2;

            while(var2 >= 0 && var1.charAt(var2) != var3) {
               --var2;
            }
         default:
            --var2;
            break;
         case ':':
            return false;
         }
      }

      return true;
   }

   byte[] a(zabd var1, String var2, int var3, int var4, int var5, String var6, int var7, int var8) {
      return a(this.d, var3, var4, var5, var6, var7, var8);
   }

   static byte[] a(WorksheetCollection var0, int var1, int var2, int var3, String var4, int var5, int var6) {
      int var7 = var0.u();
      Object var8 = null;
      int var9 = -1;
      if (var1 == var7) {
         var9 = var0.getNames().b(var3, var4);
      } else {
         if (var4.length() > 2 && var4.charAt(0) == '\'') {
            var4 = var4.substring(1, 1 + (var4.length() - 2));
         }

         var4 = var4.toUpperCase();
         zbqg var10 = var0.v().a(var1);
         if (var10.b().size() > 0) {
            for(int var11 = 0; var11 < var10.b().size(); ++var11) {
               zuk var12 = (zuk)var10.b().get(var11);
               if (com.aspose.cells.b.a.zv.b(var12.e().toUpperCase(), var4)) {
                  var9 = var11;
               }
            }
         }

         if (var9 == -1) {
            zuk var14 = new zuk(var10);
            var14.a(var4);
            var9 = com.aspose.cells.b.a.a.ze.a(var10.b(), (Object)var14);
         }
      }

      byte[] var13 = new byte[7];
      switch(var6) {
      case 32:
         var13[0] = 57;
         break;
      case 64:
         var13[0] = 89;
         break;
      case 96:
         var13[0] = 121;
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var2), 0, var13, 1, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var9 + 1), 0, var13, 3, 2);
      return var13;
   }

   static boolean a(String var0, int[] var1, int[] var2, boolean var3, boolean[] var4, boolean[] var5, boolean[] var6, boolean[] var7) {
      var1[0] = -1;
      var2[0] = -1;
      if (var0.length() == 0) {
         return false;
      } else {
         char[] var8 = var0.toUpperCase().toCharArray();

         for(int var9 = 0; var9 < var8.length; ++var9) {
            switch(var8[var9]) {
            case '$':
               break;
            case '%':
            case '&':
            case '\'':
            case '(':
            case ')':
            case '*':
            case '+':
            case ',':
            case '-':
            case '.':
            case '/':
            case '0':
            case ':':
            case ';':
            case '<':
            case '=':
            case '>':
            case '?':
            case '@':
            default:
               return false;
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
               if (var2[0] == -1) {
                  if (!var3) {
                     return false;
                  }

                  var6[0] = true;
               }

               if (var9 != 0 && var8[var9 - 1] == '$') {
                  var4[0] = true;
               }

               var1[0] = var8[var9] - 48;
               ++var9;

               while(var9 < var8.length) {
                  if (!Character.isDigit(var8[var9])) {
                     return false;
                  }

                  var1[0] = var1[0] * 10 + var8[var9] - 48;
                  ++var9;
               }

               --var1[0];
               if (var1[0] > 1048575) {
                  return false;
               }
               break;
            case 'A':
            case 'B':
            case 'C':
            case 'D':
            case 'E':
            case 'F':
            case 'G':
            case 'H':
            case 'I':
            case 'J':
            case 'K':
            case 'L':
            case 'M':
            case 'N':
            case 'O':
            case 'P':
            case 'Q':
            case 'R':
            case 'S':
            case 'T':
            case 'U':
            case 'V':
            case 'W':
            case 'X':
            case 'Y':
            case 'Z':
               if (var2[0] != -1) {
                  return false;
               }

               int var10;
               for(var10 = var9 + 1; var10 < var8.length && Character.isLetter(var8[var10]); ++var10) {
                  ;
               }

               if (var10 == var8.length) {
                  if (!var3) {
                     return false;
                  }

                  var7[0] = true;
               }

               if (var10 - var9 > 3) {
                  return false;
               }

               if (var9 != 0 && var8[var9 - 1] == '$') {
                  var5[0] = true;
               }

               var2[0] = var8[var9] - 65 + 1;
               ++var9;

               while(var9 < var10) {
                  var2[0] = var2[0] * 26 + var8[var9] - 65 + 1;
                  ++var9;
               }

               --var9;
               --var2[0];
               if (var2[0] > 16383) {
                  return false;
               }
            }
         }

         return true;
      }
   }
}
